package com.mars.manager.exception;

import com.mars.common.exception.BizException;

public class MenuBizException extends BizException {

	private static final long serialVersionUID = 1L;
	
	/**
	 * 未知异常
	 */
	public static final int BANK_UNKNOWN_ERROR = 10020000;
	/**
	 * 参数错误
	 */
	public static final int BANK_SERVICE_PARAMS_ERROR = 10020001;

	/**
	 * 父节点不能关联自己
	 */
	public static final MenuBizException NOT_RELATED_SELF = new MenuBizException(10020114, " 父节点不能关联自己");
	
	public static final MenuBizException REMITTANCERECORD_NOT_EXIT = new MenuBizException(10020114, " 结算打款不存在");

	public static final MenuBizException PEPEAT_REMITTANCERECORD_ERROR = new MenuBizException(10020115, "重复结算打款");

	public static final MenuBizException ACCOUNTADJUSTLOG_NOT_EXIT = new MenuBizException(10020116, "调账记录不存在");

	public static final MenuBizException ACCOUNT_SETTMENTINFO_NOT_EXIT = new MenuBizException(10020117, "自动结算中商户的结算信息不存在");

	public static final MenuBizException MERCHANT_IS_NOT_EXIT = new MenuBizException(10020118, "自动结算中商户不存在");

	public static final MenuBizException ACCOUNT_TRADEPWD_ERROR_TIMES_OUTLIMIT = new MenuBizException(10020119, "交易密码错误次数超限");

	public static final MenuBizException ACCOUNT_BUILDACCOUNTNO_ERROR = new MenuBizException(10020120, "生成账户编号错误");

	public static final MenuBizException ACCOUNT_ACCOUNTOUTADDUP_IS_NULL = new MenuBizException(10020121, "账户账出款统计记录不存在 ");

	public static final MenuBizException ACCOUNTHISTORY_IS_EXIST = new MenuBizException(10020122, "账户历史记录已存在");

	public static final MenuBizException ACCOUNT_UN_FROZEN_AMOUNT_OUTLIMIT = new MenuBizException(10020123, "解冻金额超限");

	public static final MenuBizException BATCH_CREDIT_FOR_SAME_ACCOUNT_ERROR = new MenuBizException(10020124, "同一账户批量加款错误");
	
	
	public MenuBizException() {
	}

	public MenuBizException(int code, String msg) {
		super(code, msg);
	}
	
	public MenuBizException(String msgFormat, Object... args) {
		super(msgFormat, args);
	}
	
	public MenuBizException(int code, String msgFormat, Object... args) {
		super(code, msgFormat, args);
	}
	
	
	public MenuBizException newInstance(String msgFormat, Object... args) {
		return new MenuBizException(this.code, msgFormat, args);
	}
	
	public MenuBizException logInfo() {
		logger.info("==>MenuBizException, code:" + this.code + ", msg:" + this.msg);
		return new MenuBizException(this.code, this.msg);
	}
	

}
